#ifndef SampleBase_h__
#define SampleBase_h__

#include <d3dx9.h>

class SampleBase
{
public:
	SampleBase()
		: m_device(0),
		m_windowWidth(0),
		m_windowHeight(0),
		m_windowed(true)
	{}

	bool Init(HINSTANCE hInstance, int windowWidth = 640, int windowHeight = 480, bool windowed = true);
	bool Run();
	
private:	
	void EnterMsgLoop();
protected:
	IDirect3DDevice9*  m_device;
	int                m_windowWidth;
	int                m_windowHeight;
	bool               m_windowed;
	// 
	virtual bool Setup() = 0;
	virtual void Cleanup() = 0;
	virtual bool Display(float timeDelta) = 0;

};


#endif // SampleBase_h__